package com.dc.webview.simple

import android.webkit.JavascriptInterface

class JavascriptInterface(private val fragment: WebViewFragment) {

    @JavascriptInterface
    fun jsCallAndroid() {
        fragment.activity?.runOnUiThread {
            fragment.getTvShowMsg().text = "Js调用Android方法"
        }
    }

    @JavascriptInterface
    fun jsCallAndroidArgs(args: String) {
        fragment.activity?.runOnUiThread {
            fragment.getTvShowMsg().text = args
        }
    }
}